how to convert class object to string in c